home *** CD-ROM | disk | FTP | other *** search
- package com.supercede.beans.stdawt;
-
- import java.awt.Component;
- import java.awt.TextArea;
- import java.awt.TextComponent;
-
- public class TextAreaSB extends TextArea {
- private int scrollbarVisibility;
- private static final long serialVersionUID = 1013384502036516610L;
- private static final int _version = 1;
- private int version;
-
- public TextAreaSB() {
- super("", 0, 0, 0);
- this.version = 1;
- this.scrollbarVisibility = 0;
- }
-
- public TextAreaSB(String var1) {
- super(var1, 0, 0, 0);
- this.version = 1;
- this.scrollbarVisibility = 0;
- }
-
- public TextAreaSB(int var1, int var2) {
- this("", var1, var2);
- }
-
- public TextAreaSB(String var1, int var2, int var3) {
- super(var1, var2, var3, 0);
- this.version = 1;
- this.scrollbarVisibility = 0;
- }
-
- public TextAreaSB(String var1, int var2, int var3, int var4) {
- super(var1, var2, var3, var4);
- this.version = 1;
- this.scrollbarVisibility = var4;
- }
-
- public int getScrollbarVisibility() {
- return this.scrollbarVisibility;
- }
-
- public synchronized void setScrollbarVisibility(int var1) {
- if (var1 != this.scrollbarVisibility) {
- switch (var1) {
- case 0:
- case 1:
- case 2:
- case 3:
- this.scrollbarVisibility = var1;
- Object var2 = ((Component)this).getTreeLock();
- synchronized(var2){}
-
- try {
- if (((Component)this).getPeer() != null) {
- ((TextComponent)this).removeNotify();
- ((TextArea)this).addNotify();
- ((Component)this).invalidate();
- }
- } catch (Throwable var4) {
- throw var4;
- }
-
- return;
- default:
- throw new IllegalArgumentException("illegal scrollbar value");
- }
- }
- }
- }
-